home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / bbsslt2.zip / R&E.SLT < prev    next >
Text File  |  1991-12-16  |  6KB  |  129 lines

  1. //***************************************************************************
  2. //***                                                                       *
  3. //***             R U S T Y  &  E D I E ' S  - -  L O G O N                 *
  4. //***                                                                       *
  5. //*** Description:                                                          *
  6. //***   Telix Script that automates the logon to Rusty & Edies BBS.         *
  7. //***                                                                       *
  8. //***                                                                       *
  9. //*** Script logic:                                                         *
  10. //***   1) Dials number specified by "phoneRow" variable.                   *
  11. //***   2) Logon to BBS automatically.                                      *
  12. //***                                                                       *
  13. //*** Instructions:                                                         *
  14. //***   To customize, fill in info wherever you find a //?? comment.        *
  15. //***                                                                       *
  16. //*** Hints:                                                                *
  17. //***   Script is easily modifible for other BBS's!                         *
  18. //***                                                                       *
  19. //***                                                                       *
  20. //*** Author:                                                               *
  21. //***   Joel R. DeRider                                                     *
  22. //***   Jona Computer Associates                                            *
  23. //***   181 Colleen Ave.                                                    *
  24. //***   Shoreview, MN  55126-6253                                           *
  25. //***   (612) 490-1238                                                      *
  26. //***                                                                       *
  27. //*** Change Log:                                                           *
  28. //***   12/15/91 - Initial Revision. Dedicated to the public domain.        *
  29. //***                                                                       *
  30. //***                                                                       *
  31. //***************************************************************************
  32.  
  33. main()
  34. {
  35.                                        
  36.    str phoneRow        [] = "?";        //?? point to BBS row in dialing dir    
  37.    str firstName       [] = "?";        //?? Your first name    
  38.    str lastName        [] = "?";        //?? Your last name      
  39.    str bbsPassword     [] = "?";        //?? Your BBS password    
  40.    str cr              [] = "^M";
  41.    str respondYes      [] = "y";
  42.    str respondNo       [] = "n";
  43.    int stringHit;
  44.  
  45.  
  46.    //------------------------------------------------------------------------
  47.    // String variables that will contain the strings to track 
  48.    //------------------------------------------------------------------------
  49.  
  50.    int aTrackedString1,  aTrackedString2,  aTrackedString3,  aTrackedString4,
  51.        aTrackedString5,  aTrackedString6,  aTrackedString7;
  52.  
  53.    dial (phoneRow,0);                                 // Make the phone call                        
  54.  
  55.  
  56.    //------------------------------------------------------------------------
  57.    // Set the tracking strings for loop A.
  58.    //------------------------------------------------------------------------
  59.  
  60.    aTrackedString1  = track ("Do you want graphics (Enter)=No?", 1);
  61.    aTrackedString2  = track ("What is your first name?",         1);
  62.    aTrackedString3  = track ("What is your last name?",          1);
  63.    aTrackedString4  = track ("Password (Dots will echo)?",       1);
  64.    aTrackedString5  = track ("(H)elp, More?",                    1);
  65.    aTrackedString6  = track ("Press (Enter) to continue",        1);
  66.    aTrackedString7  = track ("Main Board Command?",              1);
  67.  
  68.  
  69.    //------------------------------------------------------------------------
  70.    // LOOP A
  71.    // Will get you logged on, then exits script.
  72.    //------------------------------------------------------------------------
  73.  
  74.    while (1) 
  75.      {
  76.      terminal();               
  77.  
  78.      stringHit = track_hit (0);
  79.  
  80.           if (stringHit == aTrackedString1 )
  81.              {
  82.              cputs (respondYes);
  83.              cputs (cr);
  84.              track_free (aTrackedString1);
  85.              }
  86.      else if (stringHit == aTrackedString2)
  87.              {
  88.              cputs (firstName);
  89.              cputs (cr);
  90.              track_free (aTrackedString2);
  91.              }
  92.      else if (stringHit == aTrackedString3)
  93.              {
  94.              cputs (lastName);
  95.              cputs (cr);
  96.              track_free (aTrackedString3);
  97.              }
  98.      else if (stringHit == aTrackedString4)
  99.              {
  100.              cputs (bbsPassword);
  101.              cputs (cr);
  102.              track_free (aTrackedString4);
  103.              }
  104.      else if (stringHit == aTrackedString5)
  105.              {
  106.              cputs (respondNo);
  107.              cputs (cr);
  108.              }
  109.      else if (stringHit == aTrackedString6)
  110.              {
  111.              cputs (cr);
  112.              }
  113.      else if (stringHit == aTrackedString7)
  114.              {
  115.              track_free (aTrackedString7);
  116.              break;
  117.              }
  118.      }
  119.  
  120.  
  121.    //------------------------------------------------------------------------
  122.    // Let's clean up after ourselves!!
  123.    //------------------------------------------------------------------------
  124.  
  125.    track_free (0);              // Clear all the tracking strings.
  126.    return;                      // Make compiler happy and return from main.
  127. }
  128.  
  129.